package com.legal.app.mapper;

import java.util.List;
import com.legal.app.domain.LawyerRating;

/**
 * 律师评分Mapper接口
 * 
 * @author ALe
 * @date 2025-05-30
 */
public interface LawyerRatingMapper {
    /**
     * 查询律师评分
     * 
     * @param id 律师评分主键
     * @return 律师评分
     */
    public LawyerRating selectLawyerRatingById(Long id);

    /**
     * 查询律师评分列表
     * 
     * @param lawyerRating 律师评分
     * @return 律师评分集合
     */
    public List<LawyerRating> selectLawyerRatingList(LawyerRating lawyerRating);

    /**
     * 新增律师评分
     * 
     * @param lawyerRating 律师评分
     * @return 结果
     */
    public int insertLawyerRating(LawyerRating lawyerRating);

    /**
     * 修改律师评分
     * 
     * @param lawyerRating 律师评分
     * @return 结果
     */
    public int updateLawyerRating(LawyerRating lawyerRating);

    /**
     * 删除律师评分
     * 
     * @param id 律师评分主键
     * @return 结果
     */
    public int deleteLawyerRatingById(Long id);

    /**
     * 批量删除律师评分
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteLawyerRatingByIds(Long[] ids);

    /**
     * 获取律师平均评分
     * 
     * @param lawyerId 律师ID
     * @return 平均评分
     */
    public Double selectLawyerAverageRating(Long lawyerId);
}